Integrand size = 25, antiderivative size = 67 \[ \int \sqrt {\cos (c+d x)} \sqrt {a+b \sec (c+d x)} \, dx=\frac {2 \sqrt {\cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 a}{a+b}\right ) \sqrt {a+b \sec (c+d x)}}{d \sqrt {\frac {b+a \cos (c+d x)}{a+b}}} \]
2*(cos(1/2*d*x+1/2*c)^2)^(1/2)/cos(1/2*d*x+1/2*c)*EllipticE(sin(1/2*d*x+1/ 2*c),2^(1/2)*(a/(a+b))^(1/2))*cos(d*x+c)^(1/2)*(a+b*sec(d*x+c))^(1/2)/d/(( b+a*cos(d*x+c))/(a+b))^(1/2)
Result contains complex when optimal does not.
Time = 6.74 (sec) , antiderivative size = 244, normalized size of antiderivative = 3.64 \[ \int \sqrt {\cos (c+d x)} \sqrt {a+b \sec (c+d x)} \, dx=\frac {2 \sqrt {\cos (c+d x)} \sqrt {\cos ^2\left (\frac {1}{2} (c+d x)\right ) \sec (c+d x)} \sqrt {a+b \sec (c+d x)} \left (i (a+b) E\left (i \text {arcsinh}\left (\tan \left (\frac {1}{2} (c+d x)\right )\right )|\frac {-a+b}{a+b}\right ) \sqrt {\frac {(b+a \cos (c+d x)) \sec ^2\left (\frac {1}{2} (c+d x)\right )}{a+b}}-i (a+b) \operatorname {EllipticF}\left (i \text {arcsinh}\left (\tan \left (\frac {1}{2} (c+d x)\right )\right ),\frac {-a+b}{a+b}\right ) \sqrt {\frac {(b+a \cos (c+d x)) \sec ^2\left (\frac {1}{2} (c+d x)\right )}{a+b}}+(b+a \cos (c+d x)) \sqrt {\sec ^2\left (\frac {1}{2} (c+d x)\right )} \tan \left (\frac {1}{2} (c+d x)\right )\right )}{d (b+a \cos (c+d x)) \sqrt {\sec (c+d x)}} \]
(2*Sqrt[Cos[c + d*x]]*Sqrt[Cos[(c + d*x)/2]^2*Sec[c + d*x]]*Sqrt[a + b*Sec [c + d*x]]*(I*(a + b)*EllipticE[I*ArcSinh[Tan[(c + d*x)/2]], (-a + b)/(a + b)]*Sqrt[((b + a*Cos[c + d*x])*Sec[(c + d*x)/2]^2)/(a + b)] - I*(a + b)*E llipticF[I*ArcSinh[Tan[(c + d*x)/2]], (-a + b)/(a + b)]*Sqrt[((b + a*Cos[c + d*x])*Sec[(c + d*x)/2]^2)/(a + b)] + (b + a*Cos[c + d*x])*Sqrt[Sec[(c + d*x)/2]^2]*Tan[(c + d*x)/2]))/(d*(b + a*Cos[c + d*x])*Sqrt[Sec[c + d*x]])
Time = 0.52 (sec) , antiderivative size = 67, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.320, Rules used = {3042, 4752, 3042, 4343, 3042, 3134, 3042, 3132}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sqrt {\cos (c+d x)} \sqrt {a+b \sec (c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )} \sqrt {a+b \csc \left (c+d x+\frac {\pi }{2}\right )}dx\) |
\(\Big \downarrow \) 4752 |
\(\displaystyle \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} \int \frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {\sec (c+d x)}}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} \int \frac {\sqrt {a+b \csc \left (c+d x+\frac {\pi }{2}\right )}}{\sqrt {\csc \left (c+d x+\frac {\pi }{2}\right )}}dx\) |
\(\Big \downarrow \) 4343 |
\(\displaystyle \frac {\sqrt {\cos (c+d x)} \sqrt {a+b \sec (c+d x)} \int \sqrt {b+a \cos (c+d x)}dx}{\sqrt {a \cos (c+d x)+b}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\sqrt {\cos (c+d x)} \sqrt {a+b \sec (c+d x)} \int \sqrt {b+a \sin \left (c+d x+\frac {\pi }{2}\right )}dx}{\sqrt {a \cos (c+d x)+b}}\) |
\(\Big \downarrow \) 3134 |
\(\displaystyle \frac {\sqrt {\cos (c+d x)} \sqrt {a+b \sec (c+d x)} \int \sqrt {\frac {b}{a+b}+\frac {a \cos (c+d x)}{a+b}}dx}{\sqrt {\frac {a \cos (c+d x)+b}{a+b}}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\sqrt {\cos (c+d x)} \sqrt {a+b \sec (c+d x)} \int \sqrt {\frac {b}{a+b}+\frac {a \sin \left (c+d x+\frac {\pi }{2}\right )}{a+b}}dx}{\sqrt {\frac {a \cos (c+d x)+b}{a+b}}}\) |
\(\Big \downarrow \) 3132 |
\(\displaystyle \frac {2 \sqrt {\cos (c+d x)} \sqrt {a+b \sec (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 a}{a+b}\right )}{d \sqrt {\frac {a \cos (c+d x)+b}{a+b}}}\) |
(2*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, (2*a)/(a + b)]*Sqrt[a + b*Sec [c + d*x]])/(d*Sqrt[(b + a*Cos[c + d*x])/(a + b)])
3.9.39.3.1 Defintions of rubi rules used
Int[Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[2*(Sqrt[a + b]/d)*EllipticE[(1/2)*(c - Pi/2 + d*x), 2*(b/(a + b))], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0] && GtQ[a + b, 0]
Int[Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[Sqrt[a + b*Sin[c + d*x]]/Sqrt[(a + b*Sin[c + d*x])/(a + b)] Int[Sqrt[a/(a + b) + ( b/(a + b))*Sin[c + d*x]], x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2 , 0] && !GtQ[a + b, 0]
Int[Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)]/Sqrt[csc[(e_.) + (f_.)*(x_)] *(d_.)], x_Symbol] :> Simp[Sqrt[a + b*Csc[e + f*x]]/(Sqrt[d*Csc[e + f*x]]*S qrt[b + a*Sin[e + f*x]]) Int[Sqrt[b + a*Sin[e + f*x]], x], x] /; FreeQ[{a , b, d, e, f}, x] && NeQ[a^2 - b^2, 0]
Int[(u_)*((c_.)*sin[(a_.) + (b_.)*(x_)])^(m_.), x_Symbol] :> Simp[(c*Csc[a + b*x])^m*(c*Sin[a + b*x])^m Int[ActivateTrig[u]/(c*Csc[a + b*x])^m, x], x] /; FreeQ[{a, b, c, m}, x] && !IntegerQ[m] && KnownSecantIntegrandQ[u, x ]
Leaf count of result is larger than twice the leaf count of optimal. \(868\) vs. \(2(90)=180\).
Time = 3.81 (sec) , antiderivative size = 869, normalized size of antiderivative = 12.97
method | result | size |
default | \(\frac {2 \sqrt {-\frac {\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1}{\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}+1}}\, \sqrt {\frac {a \left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-b \left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-a -b}{\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1}}\, \left (\sqrt {\frac {a -b}{a +b}}\, a \left (1-\cos \left (d x +c \right )\right )^{3} \csc \left (d x +c \right )^{3}-\sqrt {\frac {a -b}{a +b}}\, b \left (1-\cos \left (d x +c \right )\right )^{3} \csc \left (d x +c \right )^{3}+\sqrt {-\frac {a \left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-b \left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-a -b}{a +b}}\, \sqrt {\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}+1}\, \operatorname {EllipticF}\left (\sqrt {\frac {a -b}{a +b}}\, \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), \sqrt {-\frac {a +b}{a -b}}\right ) a -\sqrt {-\frac {a \left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-b \left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-a -b}{a +b}}\, \sqrt {\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}+1}\, \operatorname {EllipticF}\left (\sqrt {\frac {a -b}{a +b}}\, \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), \sqrt {-\frac {a +b}{a -b}}\right ) b -\sqrt {-\frac {a \left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-b \left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-a -b}{a +b}}\, \sqrt {\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}+1}\, \operatorname {EllipticE}\left (\sqrt {\frac {a -b}{a +b}}\, \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), \sqrt {-\frac {a +b}{a -b}}\right ) a +\sqrt {-\frac {a \left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-b \left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-a -b}{a +b}}\, \sqrt {\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}+1}\, \operatorname {EllipticE}\left (\sqrt {\frac {a -b}{a +b}}\, \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), \sqrt {-\frac {a +b}{a -b}}\right ) b -\sqrt {\frac {a -b}{a +b}}\, a \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )-\sqrt {\frac {a -b}{a +b}}\, b \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )\right )}{d \sqrt {\frac {a -b}{a +b}}\, \left (a \left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-b \left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-a -b \right )}\) | \(869\) |
risch | \(\text {Expression too large to display}\) | \(1108\) |
2/d/((a-b)/(a+b))^(1/2)*(-((1-cos(d*x+c))^2*csc(d*x+c)^2-1)/((1-cos(d*x+c) )^2*csc(d*x+c)^2+1))^(1/2)*((a*(1-cos(d*x+c))^2*csc(d*x+c)^2-b*(1-cos(d*x+ c))^2*csc(d*x+c)^2-a-b)/((1-cos(d*x+c))^2*csc(d*x+c)^2-1))^(1/2)*(((a-b)/( a+b))^(1/2)*a*(1-cos(d*x+c))^3*csc(d*x+c)^3-((a-b)/(a+b))^(1/2)*b*(1-cos(d *x+c))^3*csc(d*x+c)^3+(-(a*(1-cos(d*x+c))^2*csc(d*x+c)^2-b*(1-cos(d*x+c))^ 2*csc(d*x+c)^2-a-b)/(a+b))^(1/2)*((1-cos(d*x+c))^2*csc(d*x+c)^2+1)^(1/2)*E llipticF(((a-b)/(a+b))^(1/2)*(-cot(d*x+c)+csc(d*x+c)),(-(a+b)/(a-b))^(1/2) )*a-(-(a*(1-cos(d*x+c))^2*csc(d*x+c)^2-b*(1-cos(d*x+c))^2*csc(d*x+c)^2-a-b )/(a+b))^(1/2)*((1-cos(d*x+c))^2*csc(d*x+c)^2+1)^(1/2)*EllipticF(((a-b)/(a +b))^(1/2)*(-cot(d*x+c)+csc(d*x+c)),(-(a+b)/(a-b))^(1/2))*b-(-(a*(1-cos(d* x+c))^2*csc(d*x+c)^2-b*(1-cos(d*x+c))^2*csc(d*x+c)^2-a-b)/(a+b))^(1/2)*((1 -cos(d*x+c))^2*csc(d*x+c)^2+1)^(1/2)*EllipticE(((a-b)/(a+b))^(1/2)*(-cot(d *x+c)+csc(d*x+c)),(-(a+b)/(a-b))^(1/2))*a+(-(a*(1-cos(d*x+c))^2*csc(d*x+c) ^2-b*(1-cos(d*x+c))^2*csc(d*x+c)^2-a-b)/(a+b))^(1/2)*((1-cos(d*x+c))^2*csc (d*x+c)^2+1)^(1/2)*EllipticE(((a-b)/(a+b))^(1/2)*(-cot(d*x+c)+csc(d*x+c)), (-(a+b)/(a-b))^(1/2))*b-((a-b)/(a+b))^(1/2)*a*(-cot(d*x+c)+csc(d*x+c))-((a -b)/(a+b))^(1/2)*b*(-cot(d*x+c)+csc(d*x+c)))/(a*(1-cos(d*x+c))^2*csc(d*x+c )^2-b*(1-cos(d*x+c))^2*csc(d*x+c)^2-a-b)
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.11 (sec) , antiderivative size = 355, normalized size of antiderivative = 5.30 \[ \int \sqrt {\cos (c+d x)} \sqrt {a+b \sec (c+d x)} \, dx=\frac {-i \, \sqrt {2} \sqrt {a} b {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )}}{3 \, a^{2}}, \frac {8 \, {\left (9 \, a^{2} b - 8 \, b^{3}\right )}}{27 \, a^{3}}, \frac {3 \, a \cos \left (d x + c\right ) + 3 i \, a \sin \left (d x + c\right ) + 2 \, b}{3 \, a}\right ) + i \, \sqrt {2} \sqrt {a} b {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )}}{3 \, a^{2}}, \frac {8 \, {\left (9 \, a^{2} b - 8 \, b^{3}\right )}}{27 \, a^{3}}, \frac {3 \, a \cos \left (d x + c\right ) - 3 i \, a \sin \left (d x + c\right ) + 2 \, b}{3 \, a}\right ) + 3 i \, \sqrt {2} a^{\frac {3}{2}} {\rm weierstrassZeta}\left (-\frac {4 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )}}{3 \, a^{2}}, \frac {8 \, {\left (9 \, a^{2} b - 8 \, b^{3}\right )}}{27 \, a^{3}}, {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )}}{3 \, a^{2}}, \frac {8 \, {\left (9 \, a^{2} b - 8 \, b^{3}\right )}}{27 \, a^{3}}, \frac {3 \, a \cos \left (d x + c\right ) + 3 i \, a \sin \left (d x + c\right ) + 2 \, b}{3 \, a}\right )\right ) - 3 i \, \sqrt {2} a^{\frac {3}{2}} {\rm weierstrassZeta}\left (-\frac {4 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )}}{3 \, a^{2}}, \frac {8 \, {\left (9 \, a^{2} b - 8 \, b^{3}\right )}}{27 \, a^{3}}, {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (3 \, a^{2} - 4 \, b^{2}\right )}}{3 \, a^{2}}, \frac {8 \, {\left (9 \, a^{2} b - 8 \, b^{3}\right )}}{27 \, a^{3}}, \frac {3 \, a \cos \left (d x + c\right ) - 3 i \, a \sin \left (d x + c\right ) + 2 \, b}{3 \, a}\right )\right )}{3 \, a d} \]
1/3*(-I*sqrt(2)*sqrt(a)*b*weierstrassPInverse(-4/3*(3*a^2 - 4*b^2)/a^2, 8/ 27*(9*a^2*b - 8*b^3)/a^3, 1/3*(3*a*cos(d*x + c) + 3*I*a*sin(d*x + c) + 2*b )/a) + I*sqrt(2)*sqrt(a)*b*weierstrassPInverse(-4/3*(3*a^2 - 4*b^2)/a^2, 8 /27*(9*a^2*b - 8*b^3)/a^3, 1/3*(3*a*cos(d*x + c) - 3*I*a*sin(d*x + c) + 2* b)/a) + 3*I*sqrt(2)*a^(3/2)*weierstrassZeta(-4/3*(3*a^2 - 4*b^2)/a^2, 8/27 *(9*a^2*b - 8*b^3)/a^3, weierstrassPInverse(-4/3*(3*a^2 - 4*b^2)/a^2, 8/27 *(9*a^2*b - 8*b^3)/a^3, 1/3*(3*a*cos(d*x + c) + 3*I*a*sin(d*x + c) + 2*b)/ a)) - 3*I*sqrt(2)*a^(3/2)*weierstrassZeta(-4/3*(3*a^2 - 4*b^2)/a^2, 8/27*( 9*a^2*b - 8*b^3)/a^3, weierstrassPInverse(-4/3*(3*a^2 - 4*b^2)/a^2, 8/27*( 9*a^2*b - 8*b^3)/a^3, 1/3*(3*a*cos(d*x + c) - 3*I*a*sin(d*x + c) + 2*b)/a) ))/(a*d)
\[ \int \sqrt {\cos (c+d x)} \sqrt {a+b \sec (c+d x)} \, dx=\int \sqrt {a + b \sec {\left (c + d x \right )}} \sqrt {\cos {\left (c + d x \right )}}\, dx \]
\[ \int \sqrt {\cos (c+d x)} \sqrt {a+b \sec (c+d x)} \, dx=\int { \sqrt {b \sec \left (d x + c\right ) + a} \sqrt {\cos \left (d x + c\right )} \,d x } \]
\[ \int \sqrt {\cos (c+d x)} \sqrt {a+b \sec (c+d x)} \, dx=\int { \sqrt {b \sec \left (d x + c\right ) + a} \sqrt {\cos \left (d x + c\right )} \,d x } \]
Timed out. \[ \int \sqrt {\cos (c+d x)} \sqrt {a+b \sec (c+d x)} \, dx=\int \sqrt {\cos \left (c+d\,x\right )}\,\sqrt {a+\frac {b}{\cos \left (c+d\,x\right )}} \,d x \]